<template>
	<uni-list>
		<view>
			<uni-list-item title="照片" :rightText="info.avatarBytes">
				<template v-slot:footer>
					<image style="width: 100px;height: 100px;" class="slot-image" :src="url+info.avatarBytes"></image>
				</template>
			</uni-list-item>
			<uni-list-item title="姓名" :rightText="info.name" />
			<uni-list-item title="身份证号" :rightText="info.idNumber" />
			<uni-list-item title="手机号" :rightText="info.mobile" />
			<uni-list-item title="访问社区" :rightText="info.groupName" />
			<!-- <uni-list-item title="照片" :rightText="info.avatarBytes" /> -->


			<uni-list-item title="人员类型" :rightText="info.type==1?'业主':info.type==2?'访客':'黑名单'" />
			<view v-if="info.type==2">
				<uni-list-item title="访问日期" :rightText="info.dateTimeFrom" />
				<uni-list-item title="截止日期" :rightText="info.dateTimeTo" />
				<uni-list-item title="访问目的" :rightText="info.guestPurpose" />
			</view>

			
			<uni-list-item class="item" title="审核状态" :rightText="info.status==0?'未审核':info.status==2?'通过':'驳回'" />
			<uni-list-item class="item" title="审核意见" :rightText="info.remark" />
			<uni-list-item title="审核时间" :rightText="info.examineTime" />
		</view>



	</uni-list>
</template>

<script>
	import {
		request,
		baseURL
	} from '../../api/request';


	export default {
		data() {
			return {
				info: {},
				url: baseURL + "/api/v1/common/download/"
			}
		},
		onLoad(options) {
			let item = JSON.parse(options.item);
			console.log(item);
			// item.groupNames = item.groupNames.join(',')
			this.info = item

		}
	}
</script>
<style>
	.item {
		color: black;
		font-weight: 600;
	}
</style>